package com.yootk.service.impl;

import com.yootk.dao.IDeptDAO;
import com.yootk.service.IDeptService;
import com.yootk.vo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service // 表示现在是业务层的实现类
public class DeptServiceImpl implements IDeptService {
    @Autowired // 实例的注入
    private IDeptDAO deptDAO; // 需要数据层的实例
    @Override
    public Dept get(Long deptno) {
        if (deptno == null) {
            return null;
        }
        return this.deptDAO.findById(deptno);
    }
}
